//
//  UIView+BRCategory.m
//  template
//
//  Created by SoXun on 2018/7/19.
//  Copyright © 2018年 soxun. All rights reserved.
//

#import "UIView+BRCategory.h"

@implementation UIView (BRCategory)

-(UIViewController *)getCurrentVC
{
    for (UIView *next = self ; next ; next = next.superview) {
        UIResponder *nextResponder = [next nextResponder];
        if ([nextResponder isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)nextResponder;
        }
    }
    return nil;
}
@end
